<%-- 
    Document   : Movimientos de Entrada
    Created on : 10-may-2014, 16:02:01
    Author     : Isaac Paliza <anndysaac@hotmail.com>
--%>
<%@page import="Modelo.ENT_TablaMov"%>
<%@page import="Modelo.ENT_Kardex"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
            List<ENT_Kardex> LM = (ArrayList<ENT_Kardex>) request.getAttribute("CargarKardex");
        %>
        <header>
            <samp style=color:#FA6900;>Gestionar Kardex - Movimientos de Entrada / Salida</samp>
        </header>
        <section>
            <section>
                <table style=color:#FFFFFF; bgcolor= "#8A9B0F" width="100%" height="100%">
                    <c:forEach items="${requestScope['CargarKardexCabezera']}" var="d" varStatus="c">
                        <tr>
                            <th align="left" width="70%" rowspan="2" colspan="2">Colegio:<i> # ${d['idColegio']} ${d['nombre']}</i></th>
                            <th align="right" width="30%" >Distrito:<i> ${d['distrito']}</i></th>
                        </tr>
                        <tr>
                            <th align="right" colspan="2">Fecha:<i> 28-04-2014</i></th>
                        </tr>
                        <tr>
                            <th align="left" colspan="3">Duracion:<i> ${d['duracion']}</i></th>
                        </tr>
                    </c:forEach>
                </table>
            </section>
            <br>
            <table width="100%" height="100%">
            
                <tr>
                <form action='GestionarKardex' method="GET" >
                    <th align="left">Tipo de Movimiento</th>
                    <th align="left">
                        <select name="idTipoMovimiento" onchange="opcionSelect(this.form)">
                            <option value="0" selected>Seleccionar...</option>
                            <option value="1">Movimiento Entrada</option>
                            <option value="2">Movimiento Salida</option>
                        </select>
                    </th>
                    <th align="left">
                        <input type="submit" value = "OK" name="evaluarTipoMov" >
                        ${requestScope['Mensaje']}
                    </th>
                </form>
                </tr>
                
                <%-- 
                
                <tr>
                    <th align="left">Nombre Articulo</th>
                    <th align="left">
                        
                    <select name="idLibro" >
                        <option value="0" selected>Seleccionar...</option>
                        <% for (ENT_Kardex du : LM) {%>
                        <option value="<%= du.getIdLibro()%>"><%= du.getNombre()%></option>
                        <% }%>
                    </select>
                        
                    </th>
                </tr>
                <tr>
                    <th align="left">Cantidad</th>
                    <th align="left">
                        <input type="text" name="cantidad" >
                    </th>
                </tr>
                
                <tr>
                    <th align="left" colspan="2">
                        <input type="submit" value = "Agregar nuevo Movimiento" name="addMovimiento" >
                        ${requestScope['Mensaje']}
                    </th>
                </tr>
                --%>
            </table>
            <article id="contenido">
                <object type="text/html" name="V_S2" width="100%" height="100%"> 
                </object>
            </article>
            <br>
            <%-- 
            <table width="100%" height="100%">
                <tr bgcolor= "#FBB829"><th>ID</th><th align="left">Nombre del Libro</th><th>Precio</th>
                    <th>Cantida</th><th>Edip</th></tr>
                <c:forEach items="${requestScope['MovimientoEntrada']}" var="d" varStatus="c">
                    <tr>
                        <td align="center" >${d['idTablaMov']}</td>
                        <td align="left" >${d['nombre']}</td>
                        <td align="center" >${d['precioU']}</td>
                        <td align="center" >${d['cantidad']}</td>
                        <td align="center" ></td>
                    </tr>
                </c:forEach>
            </table>
            --%>
        </section>
    </body>
</html>